home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: Help:what is wrong this code?
- Date: 6 Apr 1996 02:50:41 GMT
- Organization: Nando.net Public Access
- Message-ID: <4k4m61$a6s@castle.nando.net>
- References: <4k3p3q$n76@brahms.udel.edu>
- Reply-To: actuary@nando.net (Bill McCarthy)
- NNTP-Posting-Host: grail306.nando.net
- X-Newsreader: IBM NewsReader/2 v1.2.5
-
- In <4k3p3q$n76@brahms.udel.edu>,
- yuehong@brahms.udel.edu (Yue-hong Zheng) writes:
-
- >Why it give me 0.0000?
- >
- >#include <stdio.h>
- >main () {
- >double a=9.008;
- >printf("%f\n",sqrt(a));
- >return 0;
- >}
-
- You have failed to declare sqrt before using it. Either include <math.h>,
- or declare <double sqrt( double );>
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-
-